package com.qf.flowerlanguage.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qf.flowerlanguage.dao.HomeDao;
import com.qf.flowerlanguage.dao.ProductDao;
import com.qf.flowerlanguage.entity.Home;
import com.qf.flowerlanguage.entity.Product;
import com.qf.flowerlanguage.service.HomeService;
import com.qf.flowerlanguage.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class ProductServiceImpl extends ServiceImpl<ProductDao, Product> implements ProductService {

    @Autowired
    private ProductDao productDao;
    @Override
    @Transactional(propagation = Propagation.SUPPORTS)
    public IPage<Product> getAllProductAndClasses(Page<Product> page,String cids) {
        IPage<Product> products = productDao.selectList(page,cids);

        return products;
    }
}
